Read about restore postgres database from backup, The latest news, videos, and discussion topics about restore postgres database from backup from alibabacloud.com
Backup and restore are most important when you are transporting a database. Today, we tested backup and restore using Pg_dumpall.
Backup Restore method: Pg_dump and Pg_restore, first carefully explain these two commands
Back up the database,
The following list only gives the simplest usage of backup and recovery of each database, more detailed parameters and configuration please refer to the relevant informationFirst, MySQL:Parameter description:
$user
$password
BackgroundPostgreSQL logical backup, refers to online backup database data, DDL output as SQL statements, data can be in the form of SQL statements or fixed separators (row format) output.
The backup does not affect the DML operation of the Backup
1. Fully Automated backupNeed to install postgres (preferably the same version) on the backup machineIn the Postgres directory to create a password to save the file (plaintext, so confidentiality is important), if not established, because each
Mysql, sqlsever, oracle, redis, mongo, postgres and other database backup and recovery commands, sqlseverredis
The following is a simple example of how to back up and restore each database. For more detailed parameters and configurations, refer to
0. Remove unnecessary tables and stored procedures from the 200 server Setup database
DROP TABLE "Sensorpressure";DROP FUNCTION hex_to_int (text);DROP FUNCTION "Pressuredatatosensorpressure" ();
1. Back up 200 of the SETUPD database,:p g_dump-d-H
PostgreSQL Learning Notes (v) Backup and recovery1. Backup tools: Pg_dump and Pg_dumpallThe pg_dump can back up a specified databasePg_dumpall can back up all database data and system global data at once2. The Pg_dump and Pg_dumpall tools do not
Tag: User CTI SSI create cancels VAR use SSE byteTransferred from: https://www.cnblogs.com/chjbbs/p/6480687.htmlUsage:Pg_dump [OPTION] ... [DBNAME] The database name is last, not specified by default is the database specified by the system variable
Backup
1, configure the archive mode
Configuring the archive requires editing the postgresql.conf file, which defaults to the/usr/local/pgsql/data/directory
Vim/usr/local/pgsql/data/postgesql.conf
Wal_level = Hot_standby
Archive_mode=
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.